//
//  LGReportDetailItemCell.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/11/2.
//

#import "LGReportDetailItemCell.h"

@interface LGReportDetailItemCell()
/**   */
@property (nonatomic , strong)UIImageView *imageView;
/**   */
@property (nonatomic , strong)UILabel *titleLabel;
/**   */
@property (nonatomic , strong)UILabel *contentLabel;

@end

@implementation LGReportDetailItemCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self.contentView addSubview:self.imageView];
        [self.imageView addSubview:self.titleLabel];
        [self.imageView addSubview:self.contentLabel];
    }
    return self;
}

-(void)setDataDic:(NSDictionary *)dataDic{
    _dataDic = dataDic;
    self.titleLabel.text = LGNSString(dataDic[@"title"]);
    self.contentLabel.text = LGNSString(dataDic[@"subtitle"]);
}


-(UIImageView *)imageView{
    if(!_imageView){
        _imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"报告详情-分类背景"]];
        _imageView.frame = CGRectMake(0, 0, viewPix(353), viewPix(86));
    }
    return _imageView;
}

-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"" colorString:@"#FFFFFF" textFont:LGFontWeight(17, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:2];
        _titleLabel.frame = CGRectMake(viewPix(14), viewPix(5), viewPix(325), viewPix(46));
    }
    return _titleLabel;
}

-(UILabel *)contentLabel{
    if(!_contentLabel){
        _contentLabel = [UILabel lableWithText:@"" colorString:@"#FFFFFF" textFont:LGFont(14) textAlignment:NSTextAlignmentLeft lines:1];
        _contentLabel.frame = CGRectMake(viewPix(16), viewPix(47), viewPix(325), viewPix(20));
    }
    return _contentLabel;
}

@end
